import pymysql

connect_info = {
    'port': 3306,
    'host': '192.168.104.48',
    'user': 'root',
    'password': 'cI5v4N2Q%a',
    'database': 'lap',
    'cursorclass': pymysql.cursors.DictCursor}
conn = pymysql.connect(**connect_info)
cursor = conn.cursor()
sql00 = "truncate table dwd_sen_interface_info"
sql01 = "truncate table dwd_gold_approval_rel"
sql02 = "truncate table dwd_gold_scene_policy"
sql03 = "truncate table dwd_sen_sys_res"
sql04 = "truncate table dwd_sen_app_res"
sql05 = "truncate table dwd_sen_person"
sql06 = "truncate table dwd_res_ip_rel"
sql07 = "truncate table dwd_res"
sql08 = "truncate table dwd_role"
sql09 = "truncate table dwd_pracct_slacct_rel"
sql10 = "truncate table dwd_org"
sql11 = "truncate table dwd_slacct"
sql12 = "truncate table dwd_pracct"
sql13 = "truncate table dwd_hr_person"
sql_list = [sql00, sql01, sql02, sql03, sql04, sql05, sql06, sql07, sql08, sql09, sql10, sql11, sql12, sql13]
for sql in sql_list:
    print(sql)
    cursor.execute(sql)
cursor.close()
conn.close()
